package com.wang.service.impl;

import com.wang.dao.SupplierDao;
import com.wang.pojo.Supplier;
import com.wang.service.SupplerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class SupplerServiceImpl implements SupplerService {
    @Autowired
    private SupplierDao supplierDao;
    @Override
    public List<Supplier> list() {
        return supplierDao.list();
    }

    @Override
    public List<Supplier> listLike(String supName) {
        return supplierDao.listLike(supName);
    }

    @Override
    public int add(Supplier supplier) {
        return supplierDao.add(supplier);
    }

    @Override
    public int delete(int id) {
        return supplierDao.delete(id);
    }
}
